<script type="text/javascript">
cursel_auto = 1;
cursel_timer = 0;
stop = 0;
function setTab2(name,cursel,n){
 cursel_auto = cursel+1;
 for(i=1;i<=n;i++){
  var menu=document.getElementById(name+i);
  if(menu){
    var con=document.getElementById("con_"+name+"_"+i);
    menu.className=i==cursel?"hover":"";
    con.style.display=i==cursel?"block":"none";
  }
 }
}
function autoCursel(){
   return setTab2('one', (cursel_auto-1)%7+1 ,7)
}
function stopTab(){
    stop = 1;
    if(cursel_timer) clearInterval(cursel_timer);
}
function startTab(){
    stop = 0;
    cursel_timer = setInterval(autoCursel, 4000);
}
startTab();
</script>
<!--热点图片开始-->
        <div class="Hot_ad">
           <div class="big_img">
<?php
    $i = 1;
	$liStr = "";
    foreach($newsArray as $row_array)
    {
           $image = $row_array["focus_photo"];
           if($image == null || $image == "")
               $image = sfConfig::get("app_no_image");
           switch($row_array["content_type_i"])
           {
               case 1001: //视频
                   $url="video/detail?videoId=";
                   break;
               case 1002: //明星
                   $url="celebrity/detail?celebrityId=";
                   break;
               case 1003://美图
                   $url="album/detail?photoGroupId=";
                   break;
               //case 1004://杂志
                   //$url="";
                   //break;
               default: //新闻
                   $url="news/detail?id=";
                   break;
           }
           $url = $url.$row_array["content_id"];
?>
            <div onmouseover="stopTab()" onmouseout='startTab();' id="con_one_<?php echo $i; if ($i != 1) echo "\" style=\"display:none\""; ?>" class="hover">
                <?php

                    echo link_to("<img src=\"".$image."\" >",$url,array("target" => "_blank"))
                ?>
				 <div class="hot_about">
				   <h3><?php echo $row_array["sub_title"]; ?></h3>
				   <P><?php echo $row_array["short_word"]; ?></P>
				 </div>
		    </div>
 <?php
         $liStr = $liStr."<li id=\"one".$i ."\" onmouseout='startTab();' onmouseover=\"stopTab();setTab2('one',".$i . "," . $row_count .")\" ";
		 if ($i == 1)
		     $liStr = $liStr."class=\"hover\"";
		 $liStr = $liStr."><img src=\"".$image."\" class=\"focusnews_samll_img\" ><p></p></li>";
         $i++;

    }
	echo "</div><ul>".$liStr."</ul>";
?>
        </div>
         <!--热点图片结束-->
 
